package model
{
	import flash.events.EventDispatcher;
	import flash.events.IEventDispatcher;
	import flash.geom.Point;
	
	public class LuckyItem extends EventDispatcher
	{
		private var _id:int;
		private var _item_id:int;
		private var _content:String;
		private var _location:Point;
		private var _member:String;
		private var _createdTime:String;
		private var _comments:int;
		
		public function LuckyItem(item:Object)
		{
			super(null);
			id = int(item.id);
			item_id = int(item.item_id);
			member = item.member;
			content = item.content;
			if(item.location)location = new Point(item.location.split(",")[0],item.location.split(",")[1]);
			createdTime = item.created_time;
			comments = int(item.comments);
		}

		public function get id():int
		{
			return _id;
		}

		public function set id(value:int):void
		{
			_id = value;
		}
		
		public function get item_id():int
		{
			return _id;
		}

		public function set item_id(value:int):void
		{
			_id = value;
		}

		public function get content():String
		{
			return _content;
		}

		public function set content(value:String):void
		{
			_content = value;
		}

		public function get location():Point
		{
			return _location;
		}

		public function set location(value:Point):void
		{
			_location = value;
		}

		public function get member():String
		{
			return _member;
		}

		public function set member(value:String):void
		{
			_member = value;
		}

		public function get createdTime():String
		{
			return _createdTime;
		}

		public function set createdTime(value:String):void
		{
			_createdTime = value;
		}

		public function get comments():int
		{
			return _comments;
		}

		public function set comments(value:int):void
		{
			_comments = value;
		}


	}
}